local FightBuff = require("gameLogic.fight.fightBuff.FightBuff")
local BuffConfusion = class("BuffConfusion", FightBuff)

function BuffConfusion:ctor(config, entity, whoEntity)
    BuffConfusion.super.ctor(self, config, entity, whoEntity)
end

function BuffConfusion:_excute(battleReport)
    self._oldBehavior = self._entity:getBehavior()
    local confusion = require("gameLogic.fight.fightBehavior.ConfusionBehavior").new()
    self._entity:setBehavior(confusion)
end

function BuffConfusion:resetbuff()
    if self._oldBehavior then
        self._entity:setBehavior(self._oldBehavior)
    end
end

return BuffConfusion
